<?php

namespace App\Models;

use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class Temp
 * @package App\Models
 * @version July 23, 2018, 2:56 am UTC
 *
 * @property string name
 */
class Temp extends Model
{
    use SoftDeletes;

    public $table = 'temps';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'name'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'name' => 'string'
    ];

    /**
     * Validation rules
     *
     * @var array
     */
    public static $rules = [
        'name' => 'required'
    ];

    public function questions() {
    	return $this->hasMany(Questions::class, 'temp_id', 'id');
    }

    public function sysComments() {
    	return $this->hasOne(SysComment::class, 'temp_id', 'id');
    }
}
